<?php
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2019/12/4
 * Time: 11:27
 */
use think\facade\Route;

Route::rule('/test/test', 'play/test','*');
Route::rule('/test/test2', 'play/test2','*');

Route::group('/',function (){
    Route::get('/', 'index/index');
    Route::group('room',function(){
        Route::post('/create', 'room/create');
        Route::post('/close', 'room/closeRoom');
        Route::get('/index/:type$', 'room/index');
        Route::rule('/join/:roomid$', 'room/join','GET|POST')->pattern(['roomid' => '\d+']);
    });
    Route::post('play/:type$','play/:type');
    Route::post('search','play/search')->middleware('required', ['name','api']);
    Route::post('movieinfo','play/movieinfo')->middleware('required', ['id','api']);
    Route::post('/video/:api$', 'video/:api');
//});
})->middleware('webCheckLogin');

Route::group('/mine',function(){
    Route::rule('/login', 'mine/login','GET|POST');
    Route::rule('/register', 'mine/register','GET|POST');
    Route::post('/email', 'mine/email')->middleware('required', ['email']);
});



